function recycleData() {
    $.ajax({
        url: "countRecycle",
        type: "POST",
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        success: function (data) {
            var code = '';
            code += "<div class=\"counter-number\">\n" +
                "                                <span class=\"counter\">" + data.countRecycle + "</span>\n" +
                "                                <span>+</span>\n" +
                "                            </div>\n" +
                "                            <div class=\"item-title\">废品数量</div>";
            $("#recycle").html("");
            $("#recycle").append(code);
        }
    })
}

function userData() {
    $.ajax({
        url: "countUser",
        type: "POST",
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        success: function (data) {
            var code = '';
            code += "<div class=\"counter-number\">\n" +
                "                                <span class=\"counter\">" + data.countUser + "</span>\n" +
                "                                <span>+</span>\n" +
                "                            </div>\n" +
                "                            <div class=\"item-title\">用户数据</div>";
            $("#user").html("");
            $("#user").append(code);
        }
    })
}

function findInformByInform() {
    $.ajax({
        url: "findInformByInform",
        type: "POST",
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        success: function (data) {
            var code = '';
            code += "<div class=\"counter-number\">\n" +
                "                                <span class=\"counter\">" + data.sumInform + "</span>\n" +
                "                                <span>+</span>\n" +
                "                            </div>\n" +
                "                            <div class=\"item-title\">消息通知</div>";
            $("#findInformByInform").html("");
            $("#findInformByInform").append(code);
        }
    })
}

$(function () {
    recycleData();
    userData();
    findInformByInform();
});